﻿function actor(gname, lname, byear, nation, male) {
    this.givenname = gname;
    this.lastname = lname;
    this.birthyear = byear;
    this.nationality = nation;
    this.isMale = male;
}

function removeMovie(userid, title) {
    PageMethods.RemoveFilm(userid, title, onSuccessReturn, onFail);
}

function onSuccessReturn(result, userContext, methodName) {
    $.fancybox({ content: "<h2>Thank You</h2>Movie was successfully returned" });
    setTimeout("triggerClose()", 2000);
}

function onFail(result, userContext, methodName) {
    $.fancybox({ content: "<h2>Error</h2>Failed to return movie!" });
}

function triggerClose() {
    $.fancybox.close();
}
